<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>预算询价列表</title>
    <link href="/res/css/respective/priceAsk/buyer.css" rel="stylesheet">
    <script src="/res/js/common/jquery.1.9.1.min.js"></script>
</head>
<body>
[#assign  menucode ="myProject"]
<div class="warp">
[#include "/front/common/front_headAzt.html"]
    <div class="backcontent">
	[#include "/front/common/front_leftAzt.html"]
        <div class="back-main">
            <div class="mainContent">
                <div class="mainContentWhite">
                    <h1>询价详情</h1>
                    <label class="opDetail" style="text-align: right; float: right;">
                        [#if enquiry.state!=4 && userid == enquiry.userId ]
                        <a style="margin-right: 25px;"  onclick="closeEnquiry(${enquiry.id})" >取消询价</a>
                        [/#if]
                        <a href="/enquiry/project/detail/p/${enquiry.projectId}/t/${enquiry.qtype}">返回</a></label>
                    <hr>
                    <h2>基本信息</h2>
                    <div class="baseInfo">
                        <div>
                            <dfn>
                                询价名称：<span class="ellipsis" title="${enquiry.enquiryName!}">${enquiry.enquiryName!} </span>
                            </dfn>
                            <dfn>
                                发布公司：<span>${enquiry.companyName!} </span>
                            </dfn>
                        </div>

                        <div>
                            <dfn>
                                项目名称：<span>${enquiry.enqProject.projectName!} </span>
                            </dfn>
                            [#if enquiry.qtype ==2]
                            <dfn>
                                支付方式：<span>${EnqPaymentEnum.getName(enquiry.payment!1)}</span>
                            </dfn>
                            [/#if]
                        </div>
                        <div>
                            <dfn>
                                客户名称：<span>${enquiry.enqProject.customerName!} </span>
                            </dfn>
                            <dfn>
                                项目所在地：<span>${(enquiry.enqProject.provinceName)!}
											${(enquiry.enqProject.cityName)!} </span>
                            </dfn>
                        </div>
                        <div>
                            <dfn>
                                是否含税：<span>[#if enquiry.taxPrice==3]不含税[#else]含税${enquiry.taxInstro!0}%[/#if]
										</span>

                            </dfn>
                            <dfn>
                                是否含运费：<span>[#if enquiry.shipPrice==1]含运费[#else]不含运费[/#if] </span>
                            </dfn>
                        </div>
                        <div>
                            <dfn>
                                质保要求：<span>${enquiry.qualityString!}</span>

                            </dfn>
                            <dfn>
                            [#if enquiry.attachfile?? && enquiry.attachfile!="" ][#if enquiry.qtype==1]项目资料[#else]附件[/#if]：[#if enquiry.attachfile?? && enquiry.attachfile!="" ]<span><a href="${enquiry.attachfile!} ">[#if enquiry.qtype==1]下载资料[#else]下载附件[/#if]</a></span>[/#if][/#if]
                            </dfn>
                        </div>
                    </div>
                    <hr style="margin-bottom: 15px;">
                    <div class="othNed">
                        <label style="color: #999999">补充说明：</label>
					${enquiry.otherRemarks!}
                    </div>
				[#if enquiry.excelpath?? ]
                    <h2 class="thirdTitle">询价清单</h2>
                    <div class="imgYalign">
                        <h6 style="padding-top: 20px;">
                            询价清单[#if enquiry.excelName?? ]：  <a>${enquiry.excelName!}</a>[/#if]
                        </h6>
                        <button onclick="download('${enquiry.excelpath}')" type="button"
                                class="downButt"
                                style="margin-top: 15px;">下载清单</button>
                    </div>
				[/#if]

                [#if enquiry.items?? && enquiry.items?size>0 ]
                    <table id="enqItemTable" class="table noBorder smallTable"
                           style="width: 100%;">
                        <thead>
                        <tr class="handHead">
                            <th style="width: 175px;">所属系统</th>
                            <th><dfn> <span>*</span>商品名称 </dfn></th>
                            <th><dfn>品牌</dfn></th>
                            <th><dfn>型号</dfn></th>
                            <th><dfn> <span>*</span>单位 </dfn></th>
                            <th><dfn> <span>*</span>数量 </dfn></th>
                            <th><dfn>技术参数</dfn></th>
                        </tr>
                        </thead>
                        <tbody id="handBody" class="handBody">
							[#list enquiry.items as item ]
                            <tr>
                                <td style="text-align: left;padding-left: 15px;">${item.categorySName!}</td>
                                <td>${item.productName!}</td>
                                <td>${item.brand!}</td>
                                <td>${item.model!}</td>
                                <td>${item.unit!}</td>
                                <td>${item.quantity!}</td>
                                <td>${item.descr!}</td>
                            </tr>
							[/#list]
                        </tbody>
                    </table>
				[/#if]

                    [#--状态 0:待审核,1:已发布,2:不通过,3:重新审核4：已关闭 5：已截止--]
                    [#if enquiry.state == 0 || enquiry.state ==3 ]
                    <div class="noPassReson">
                        <h1>[#if enquiry.state==0 ]待审核[#else]重新审核[/#if]</h1>
                        <h2 style="background: none;">您发布的询价已提交，我们将在一工作日内为您完成清单审核，如比较紧急请致电：400 848 1365</h2>
                     </div>
                    [#elseif enquiry.state==2 ]
                    <div class="noPassReson">
                        <h1>审核未通过原因</h1>
                        <h2 style="background: none;">${enquiry.backreason!}</h2>
                    </div>
                    [/#if]
                </div>
            </div>
        </div>
        <!-- 底部菜单-->
	[#include "/front/common/front_footerAzt.html"]
    </div>

</div>

<script src="/res/js/common/common.js"></script>
<script src="/res/third/layer/layer.js"></script>
<script src="/res/third/layer/layer.extends.js"></script>
<script src="/res/js/common/jquery.ellipsis.js"></script> 
<script type="text/javascript">
	$(function(){
		$(".ellipsis").ellipsis({maxWidth:290,maxLine:1});
	});
    function download(path) {
        location.href=path;
    }

    function closeEnquiry(enqid) {
        layer.confirm("确认取消询价吗?[@rule_content code="user_cancel_lists"/]",function () {
            layer.post({
                url:"/enquiry/close",
                data:{enqid:enqid},
                    success:function (data) {
                    if(data.success){
                        layer.alert("成功取消",function () {
                            location.reload();
                        })
                    }else{
                        layer.msgShort(data.msg);
                    }
                }
            })
        })
    }
</script>
</body>
</html>
